Fix execution of dialog
authorAndreas Pokorny <andreas.pokorny@canonical.com>
Tue, 19 Jul 2016 08:36:45 +0000 (10:36 +0200)
committerWilliam Hua <william.hua@canonical.com>
Thu, 11 Aug 2016 16:23:38 +0000 (12:23 -0400)
When a dialog is created, the mir event source is already executed on the
call stack. So without the recurse flag it will not be run in the main loop
used for the dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=768138

gdk/mir/gdkmireventsource.c

index 910d3892a59cf834235538839af59a18fa1a523a..b36306216795b203512e5906b2da28f26cce4589 100644 (file)
@@ -725,8 +725,14 @@ _gdk_mir_event_source_new (GdkDisplay *display)
 {
   GdkMirEventSource *source;
   GSource *g_source;
+  char *name;
 
   g_source = g_source_new (&gdk_mir_event_source_funcs, sizeof (GdkMirEventSource));
+  name = g_strdup_printf ("GDK Mir Event source (%s)", gdk_display_get_name (display));
+  g_source_set_name (g_source, name);
+  g_free (name);
+  g_source_set_priority (g_source, GDK_PRIORITY_EVENTS);
+  g_source_set_can_recurse (g_source, TRUE);
   g_source_attach (g_source, NULL);
 
   source = (GdkMirEventSource *) g_source;